<template>
	<view class="result">
		<view class="tips tc">
			<view class="p-15">
				<image src="/static/images/fail.png" v-if="payState=='fail'"/>
				<image src="/static/images/success.png" v-if="payState=='success'"/>
			</view>
			<text class="notice ts-34 tb">{{ payText[payState] }}</text>
		</view>
		<view class="action m-30 tc flex ts-28">
			<view class="btn bl" @tap="$xyfun.to('/pages/index',true)">返回首页</view>
			<view class="btn bl" v-if="payState == 'fail'" @tap="$xyfun.to('pages/user/coupons')">重新支付</view>
			<view class="btn bl" v-if="payState !== 'fail' && orderType=='coupons'" @tap="$xyfun.to('/pages/user/coupons/log?type=buy')">查看券包</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				payment: 'wechat',
				payState: 'fail',
				orderType: '',
				orderDetail:{},
        payText: {
          fail: '支付失败',
          success: '支付成功',
        },
			}
		},
		async onLoad() {
			var options = this.$Route.query;
      this.payState = options.payState;

		},
		methods: {

		}
	}
</script>

<style scoped lang="scss">
	.result{
		.tips{padding: 150rpx 0 30rpx;
			image{width: 140rpx;height: 140rpx;}
		}
		.action{
			.btn{flex: 1;height: 70rpx;border-radius: 35rpx;margin: 0 15rpx;line-height: 70rpx;}
		}
		.pay-model-box{width: 80%;}
	}
</style>
